package com.kymatrix.kycarbon.xsmd.system.server.outer;

import com.kymatrix.kycarbon.xsmd.system.server.service.ITokenService;
import com.kymatrix.kycarbon.xsmd.common.springsecurity.LoginUser;
import com.kymatrix.kycarbon.xsmd.common.springsecurity.api.OAuth2TokenApi;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author liujie
 * @date 2024-04-15
 */
@Component
@Slf4j
public class OAuth2TokenApiImpl implements OAuth2TokenApi {
    
    @Resource
    private ITokenService tokenService;
    
    @Override
    public LoginUser checkAccessToken(String accessToken) {
        return tokenService.checkAccessToken(accessToken);
    }
}
